﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// abstract TinTucDanhMuc typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class TinTucDanhMucDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<TinTucDanhMucDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.TinTucDanhMuc _currentTinTucDanhMuc = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxTinTucDanhMucDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxTinTucDanhMucErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxTinTucDanhMucBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the IDTinTucDanhMuc property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDTinTucDanhMucDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IDTinTucDanhMucCha property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDTinTucDanhMucChaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Ten property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxTenDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the SoLienKet property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxSoLienKetDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ViTri property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxViTriDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the NhaCungCap property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxNhaCungCapDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TrangThai property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxTrangThaiDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemChinhSua property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemChinhSuaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemCapNhat property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemCapNhatDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.TinTucDanhMuc> _TinTucDanhMucList;
				
		/// <summary> 
		/// The list of TinTucDanhMuc to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.TinTucDanhMuc> TinTucDanhMucList
		{
			get {return this._TinTucDanhMucList;}
			set
			{
				this._TinTucDanhMucList = value;
				this.uxTinTucDanhMucBindingSource.DataSource = null;
				this.uxTinTucDanhMucBindingSource.DataSource = value;
				this.uxTinTucDanhMucDataGridView.DataSource = null;
				this.uxTinTucDanhMucDataGridView.DataSource = this.uxTinTucDanhMucBindingSource;				
				//this.uxTinTucDanhMucBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxTinTucDanhMucBindingSource_ListChanged);
				this.uxTinTucDanhMucBindingSource.CurrentItemChanged += new System.EventHandler(OnTinTucDanhMucBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnTinTucDanhMucBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentTinTucDanhMuc = uxTinTucDanhMucBindingSource.Current as Entities.TinTucDanhMuc;
			
			if (_currentTinTucDanhMuc != null)
			{
				_currentTinTucDanhMuc.Validate();
			}
			//_TinTucDanhMuc.Validate();
			OnCurrentEntityChanged();
		}

		//void uxTinTucDanhMucBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.TinTucDanhMuc"/> instance.
		/// </summary>
		public Entities.TinTucDanhMuc SelectedTinTucDanhMuc
		{
			get {return this._currentTinTucDanhMuc;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxTinTucDanhMucDataGridView.VirtualMode;}
			set
			{
				this.uxTinTucDanhMucDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxTinTucDanhMucDataGridView.AllowUserToAddRows;}
			set {this.uxTinTucDanhMucDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxTinTucDanhMucDataGridView.AllowUserToDeleteRows;}
			set {this.uxTinTucDanhMucDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxTinTucDanhMucDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxTinTucDanhMucDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="TinTucDanhMucDataGridViewBase"/> class.
		/// </summary>
		public TinTucDanhMucDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxTinTucDanhMucDataGridView = new System.Windows.Forms.DataGridView();
			this.uxTinTucDanhMucBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxTinTucDanhMucErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDTinTucDanhMucDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDTinTucDanhMucChaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxTenDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxSoLienKetDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxViTriDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxNhaCungCapDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxTrangThaiDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			this.uxThoiDiemChinhSuaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThoiDiemCapNhatDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucDanhMucDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucDanhMucBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucDanhMucErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxTinTucDanhMucErrorProvider
			// 
			this.uxTinTucDanhMucErrorProvider.ContainerControl = this;
			this.uxTinTucDanhMucErrorProvider.DataSource = this.uxTinTucDanhMucBindingSource;						
			// 
			// uxTinTucDanhMucDataGridView
			// 
			this.uxTinTucDanhMucDataGridView.AutoGenerateColumns = false;
			this.uxTinTucDanhMucDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxTinTucDanhMucDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDTinTucDanhMucDataGridViewColumn,
		this.uxIDTinTucDanhMucChaDataGridViewColumn,
		this.uxTenDataGridViewColumn,
		this.uxSoLienKetDataGridViewColumn,
		this.uxViTriDataGridViewColumn,
		this.uxNhaCungCapDataGridViewColumn,
		this.uxTrangThaiDataGridViewColumn,
		this.uxThoiDiemChinhSuaDataGridViewColumn,
		this.uxThoiDiemCapNhatDataGridViewColumn			});
			this.uxTinTucDanhMucDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxTinTucDanhMucDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxTinTucDanhMucDataGridView.Name = "uxTinTucDanhMucDataGridView";
			this.uxTinTucDanhMucDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxTinTucDanhMucDataGridView.TabIndex = 0;	
			this.uxTinTucDanhMucDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxTinTucDanhMucDataGridView.EnableHeadersVisualStyles = false;
			this.uxTinTucDanhMucDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnTinTucDanhMucDataGridViewDataError);
			this.uxTinTucDanhMucDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnTinTucDanhMucDataGridViewCellValueNeeded);
			this.uxTinTucDanhMucDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnTinTucDanhMucDataGridViewCellValuePushed);
			
			//
			// uxIDTinTucDanhMucDataGridViewColumn
			//
			this.uxIDTinTucDanhMucDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDTinTucDanhMucDataGridViewColumn.DataPropertyName = "IDTinTucDanhMuc";
			this.uxIDTinTucDanhMucDataGridViewColumn.HeaderText = "IDTinTucDanhMuc";
			this.uxIDTinTucDanhMucDataGridViewColumn.Name = "uxIDTinTucDanhMucDataGridViewColumn";
			this.uxIDTinTucDanhMucDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDTinTucDanhMucDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDTinTucDanhMucDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDTinTucDanhMucChaDataGridViewColumn
			//
			this.uxIDTinTucDanhMucChaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDTinTucDanhMucChaDataGridViewColumn.DataPropertyName = "IDTinTucDanhMucCha";
			this.uxIDTinTucDanhMucChaDataGridViewColumn.HeaderText = "IDTinTucDanhMucCha";
			this.uxIDTinTucDanhMucChaDataGridViewColumn.Name = "uxIDTinTucDanhMucChaDataGridViewColumn";
			this.uxIDTinTucDanhMucChaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDTinTucDanhMucChaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDTinTucDanhMucChaDataGridViewColumn.ReadOnly = false;		
			//
			// uxTenDataGridViewColumn
			//
			this.uxTenDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTenDataGridViewColumn.DataPropertyName = "Ten";
			this.uxTenDataGridViewColumn.HeaderText = "Ten";
			this.uxTenDataGridViewColumn.Name = "uxTenDataGridViewColumn";
			this.uxTenDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTenDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTenDataGridViewColumn.ReadOnly = false;		
			//
			// uxSoLienKetDataGridViewColumn
			//
			this.uxSoLienKetDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxSoLienKetDataGridViewColumn.DataPropertyName = "SoLienKet";
			this.uxSoLienKetDataGridViewColumn.HeaderText = "SoLienKet";
			this.uxSoLienKetDataGridViewColumn.Name = "uxSoLienKetDataGridViewColumn";
			this.uxSoLienKetDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxSoLienKetDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxSoLienKetDataGridViewColumn.ReadOnly = false;		
			//
			// uxViTriDataGridViewColumn
			//
			this.uxViTriDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxViTriDataGridViewColumn.DataPropertyName = "ViTri";
			this.uxViTriDataGridViewColumn.HeaderText = "ViTri";
			this.uxViTriDataGridViewColumn.Name = "uxViTriDataGridViewColumn";
			this.uxViTriDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxViTriDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxViTriDataGridViewColumn.ReadOnly = false;		
			//
			// uxNhaCungCapDataGridViewColumn
			//
			this.uxNhaCungCapDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxNhaCungCapDataGridViewColumn.DataPropertyName = "NhaCungCap";
			this.uxNhaCungCapDataGridViewColumn.HeaderText = "NhaCungCap";
			this.uxNhaCungCapDataGridViewColumn.Name = "uxNhaCungCapDataGridViewColumn";
			this.uxNhaCungCapDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxNhaCungCapDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxNhaCungCapDataGridViewColumn.ReadOnly = false;		
			//
			// uxTrangThaiDataGridViewColumn
			//
			this.uxTrangThaiDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTrangThaiDataGridViewColumn.DataPropertyName = "TrangThai";
			this.uxTrangThaiDataGridViewColumn.HeaderText = "TrangThai";
			this.uxTrangThaiDataGridViewColumn.Name = "uxTrangThaiDataGridViewColumn";
			this.uxTrangThaiDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTrangThaiDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTrangThaiDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemChinhSuaDataGridViewColumn
			//
			this.uxThoiDiemChinhSuaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemChinhSuaDataGridViewColumn.DataPropertyName = "ThoiDiemChinhSua";
			this.uxThoiDiemChinhSuaDataGridViewColumn.HeaderText = "ThoiDiemChinhSua";
			this.uxThoiDiemChinhSuaDataGridViewColumn.Name = "uxThoiDiemChinhSuaDataGridViewColumn";
			this.uxThoiDiemChinhSuaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemChinhSuaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemChinhSuaDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemCapNhatDataGridViewColumn
			//
			this.uxThoiDiemCapNhatDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemCapNhatDataGridViewColumn.DataPropertyName = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.HeaderText = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.Name = "uxThoiDiemCapNhatDataGridViewColumn";
			this.uxThoiDiemCapNhatDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemCapNhatDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemCapNhatDataGridViewColumn.ReadOnly = false;		
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxTinTucDanhMucDataGridView);
			this.Name = "TinTucDanhMucDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucDanhMucErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucDanhMucDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTinTucDanhMucBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				TinTucDanhMucDataGridViewEventArgs args = new TinTucDanhMucDataGridViewEventArgs();
				args.TinTucDanhMuc = _currentTinTucDanhMuc;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class TinTucDanhMucDataGridViewEventArgs : System.EventArgs
		{
			private Entities.TinTucDanhMuc	_TinTucDanhMuc;
	
			/// <summary>
			/// the  Entities.TinTucDanhMuc instance.
			/// </summary>
			public Entities.TinTucDanhMuc TinTucDanhMuc
			{
				get { return _TinTucDanhMuc; }
				set { _TinTucDanhMuc = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxTinTucDanhMucDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnTinTucDanhMucDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxTinTucDanhMucDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnTinTucDanhMucDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxTinTucDanhMucDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDTinTucDanhMucDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].IDTinTucDanhMuc;
						break;
					case "uxIDTinTucDanhMucChaDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].IDTinTucDanhMucCha;
						break;
					case "uxTenDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].Ten;
						break;
					case "uxSoLienKetDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].SoLienKet;
						break;
					case "uxViTriDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].ViTri;
						break;
					case "uxNhaCungCapDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].NhaCungCap;
						break;
					case "uxTrangThaiDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].TrangThai;
						break;
					case "uxThoiDiemChinhSuaDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].ThoiDiemChinhSua;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						e.Value = TinTucDanhMucList[e.RowIndex].ThoiDiemCapNhat;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxTinTucDanhMucDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnTinTucDanhMucDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxTinTucDanhMucDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDTinTucDanhMucDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].IDTinTucDanhMuc = (System.Guid)e.Value;
						break;
					case "uxIDTinTucDanhMucChaDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].IDTinTucDanhMucCha = (System.Guid)e.Value;
						break;
					case "uxTenDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].Ten = (System.String)e.Value;
						break;
					case "uxSoLienKetDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].SoLienKet = (System.Byte)e.Value;
						break;
					case "uxViTriDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].ViTri = (System.Byte)e.Value;
						break;
					case "uxNhaCungCapDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].NhaCungCap = (System.String)e.Value;
						break;
					case "uxTrangThaiDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].TrangThai = (System.Boolean)e.Value;
						break;
					case "uxThoiDiemChinhSuaDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].ThoiDiemChinhSua = (System.DateTime)e.Value;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						TinTucDanhMucList[e.RowIndex].ThoiDiemCapNhat = (System.DateTime)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
